import { Module } from 'vuex';
import {
  TOGGLE_SIDEBAR,
  TOGGLE_DEVICE,
  SET_SIZE,
} from '../constant';
// import { asyncRoutes, constantRoutes } from '@/router/routes'

interface IAppState {
  sidebar: boolean;
  device: string;
  size: string;
}

export default {
  namespaced: true,
  state() {
    return {
      sidebar: true,
      device: 'desktop',
      size: 'medium',
    };
  },
  mutations: {
    [TOGGLE_SIDEBAR]: (state, payload) => {
      // state.routes = constantRoutes.concat(payload);
    },
    [TOGGLE_DEVICE]: (state, payload) => {
      // state.routes = constantRoutes.concat(payload);
    },
    [SET_SIZE]: (state, payload) => {
      // state.routes = constantRoutes.concat(payload);
    },
  },
  actions: {},
} as Module<IAppState, any>;
